<template>
	<view>
		<view class="top">
			<image src="../../static/logo (2).png" mode=""></image>
			<image src="../../static/Flod.png" mode="" @click="show"></image>
		</view>
		<view class="fix_nav" v-show="navShow">
			<slot></slot>
			<view class="user">
				<navigator @click="tiao" >{{name}},</navigator>欢迎登录
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		props:["name"],
		data() {
			return {
				navShow:false
			}
		},
		methods: {
			show(){
				this.navShow = !this.navShow
			},
			tiao(){
				uni.reLaunch({
					url:'/pages/login/login'
				})
			}
		}
	}
</script>

<style>
.user{
	color: white;
}
.top{
	display: flex;
	height: 140rpx;
	max-height: 140rpx;
	justify-content: space-between;
	
}
.top image:nth-child(1){
	width: 70%;
	height: 100%;
}
.top image:nth-child(2){
	width: 20%;
	height: 100%;
}
.fix_nav{
	padding: 20px 0rpx;
	text-align: center;
	position: fixed;
	width: 100%;
	height: 100%;
	z-index: 99999999;
	justify-content: center;
	background-color: black;
	top: 140rpx;
}
.fix_nav>.user{
	display: flex;
	justify-content: center;
	margin-top: 40rpx;
}
navigator{
	color: #007AFF;
}

</style>
